﻿@{
    if (!UrlData.Any()) {
        RequestData.SetValue("InfoPaneTitle", "잘못된 고객 ID");
        return;
    }

    int customerId = UrlData[0].AsInt();

    //  이벤트 ID가 현재 사용자에게 연결되어 있는지 확인
    var customerInfo = Customer.GetUserCustomer(WebSecurity.CurrentUserId, customerId);

    if (customerInfo == null) {
        RequestData.SetValue("InfoPaneTitle", "잘못된 고객 ID");
        return;
    }

    RequestData.SetValue("InfoPaneTitle", "고객: "+customerInfo.Name);
}
<fieldset>
    <table class="info">
        <tr>
            <td>이름</td>
            <td>@customerInfo.Name</td>
        </tr>
        <tr>
            <td>연락처</td>
            <td>@customerInfo.Phone</td>
        </tr>
        <tr>
            <td>이메일</td>
            <td>@customerInfo.Email</td>
        </tr>        
        <tr>
            <td colspan="2" class="center">                
                    <text>
                        <a href="@Href("~/Event/Edit", customerInfo.Id)">편집</a> - 
                        <a href="@Href("~/Event/Delete", customerInfo.Id)">삭제</a> - 
                    </text>
                <a href="@Href("~/Event/Download", customerInfo.Id)">다운로드</a>
            </td>
        </tr>
    </table>
</fieldset>


